package com.tal.jzb.repository;

import com.tal.jzb.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author xiefengsong
 * @date 2019-01-23 18:23
 */
@Repository
public interface UserRepository extends JpaRepository<User, Integer> {

    /**
     * 通过姓名查询,按照id倒序排序
     * @param name
     * @return
     */
    List<User> findByNameOrderByIdDesc(String name);
}
